package com.cin.cma.client.service;


import cn.hutool.http.HttpResponse;
import com.cin.cma.common.model.SocketRequest;
import com.cin.cma.common.model.SocketResponse;

import java.util.function.Function;

public interface IHttpService {
    /**
     * 请求数据
     *
     * @param url  请求路径
     * @param body 请求内容
     * @return 返回内容
     */
    SocketResponse request(String url, String body, Function<SocketRequest, HttpResponse> func);

    /**
     * 请求数据
     *
     * @param body 请求内容
     * @return 返回内容
     */
    SocketResponse request(String body, Function<SocketRequest, HttpResponse> func);
}
